import { CreateRule } from "../common";

/**
 * 根据egg-validate提供的校验规则进行书写
 */
const createUserRules: CreateRule = {
  phoneNumber: {
    type: "phone",
    message: "手机号码格式错误",
  },
  password: {
    type: "string",
    message: "请输入密码",
  },
  nikeName: {
    type: "string",
    message: "姓名必填",
  },
  role: {
    type: "array",
    message: "请选择角色",
  },
};
export { createUserRules };
